package com.woniu.commentorder.service.serviceImp;

import com.hc.entity.Agree;
import com.hc.entity.User;
import com.woniu.commentorder.mapper.UserMapper;
import com.woniu.commentorder.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImp implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User getById(int id){
        return userMapper.getById(id);
    }
    @Override
    public List<Agree> getByUser(int id){
        return userMapper.getByUser(id);
    }
    @Override
    public void dianzan(Agree agree){
        userMapper.dianzan(agree);
    }
    @Override
    public void concel(Agree agree){
        userMapper.concel(agree);
    }

}
